<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>部署 | 中微子代理</title>
    <meta name="generator" content="VuePress 1.9.2">
    <link rel="icon" href="/neutrino-proxy-vuepress/img/favicon.ico">
    <meta name="description" content="一个基于 netty 的、开源的 java 内网穿透项目">
    <meta name="keywords" content="vuepress,theme,blog,vdoing">
    <meta name="theme-color" content="#11a8cd">
    
    <link rel="preload" href="/neutrino-proxy-vuepress/assets/css/0.styles.72eb1676.css" as="style"><link rel="preload" href="/neutrino-proxy-vuepress/assets/js/app.756733d0.js" as="script"><link rel="preload" href="/neutrino-proxy-vuepress/assets/js/2.4ec61f8d.js" as="script"><link rel="preload" href="/neutrino-proxy-vuepress/assets/js/13.c2fbbac4.js" as="script"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/10.e844da0f.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/11.3926765d.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/12.57caf953.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/14.9fbad366.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/15.fbee2b43.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/16.27f8e12a.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/17.d525cdf7.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/18.d9a38399.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/19.d4edb52d.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/20.03d66876.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/21.619151c0.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/22.786c3745.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/23.9d9a0a68.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/24.7ec310f1.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/25.6c3f2489.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/26.2c5749ba.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/27.3a946426.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/28.4cd8aa66.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/3.9b2af462.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/4.1e281399.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/5.a958538c.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/6.4d153b6d.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/7.7ea0385d.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/8.91d0a5fc.js"><link rel="prefetch" href="/neutrino-proxy-vuepress/assets/js/9.3494ec1e.js">
    <link rel="stylesheet" href="/neutrino-proxy-vuepress/assets/css/0.styles.72eb1676.css">
  </head>
  <body class="theme-mode-light">
    <div id="app" data-server-rendered="true"><div class="theme-container sidebar-open have-rightmenu"><header class="navbar blur"><div title="目录" class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/neutrino-proxy-vuepress/" class="home-link router-link-active"><img src="/neutrino-proxy-vuepress/img/logo.png" alt="中微子代理" class="logo"> <span class="site-name can-hide">中微子代理</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/neutrino-proxy-vuepress/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="快速使用" class="dropdown-title"><a href="/neutrino-proxy-vuepress/pages/793dcb/" class="link-title">快速使用</a> <span class="title" style="display:none;">快速使用</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/793dcb/" class="nav-link">快速上手</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/2f674a/" class="nav-link">目录结构</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/d0d7eb/" class="nav-link">Markdown 容器</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/197691/" class="nav-link">Markdown 中使用组件</a></li><li class="dropdown-item"><h4>相关文章</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/neutrino-proxy-vuepress/pages/8dfab5/" class="nav-link">使目录栏支持h2~h6标题</a></li><li class="dropdown-subitem"><a href="/neutrino-proxy-vuepress/pages/dd027d/" class="nav-link">如何让你的笔记更有表现力</a></li><li class="dropdown-subitem"><a href="/neutrino-proxy-vuepress/pages/2b8e22/" class="nav-link">批量操作front matter工具</a></li><li class="dropdown-subitem"><a href="/neutrino-proxy-vuepress/pages/0fc1d2/" aria-current="page" class="nav-link router-link-exact-active router-link-active">部署</a></li><li class="dropdown-subitem"><a href="/neutrino-proxy-vuepress/pages/9ae0bd/" class="nav-link">关于写文章和H1标题</a></li><li class="dropdown-subitem"><a href="/neutrino-proxy-vuepress/pages/26997d/" class="nav-link">关于博客搭建与管理</a></li><li class="dropdown-subitem"><a href="/neutrino-proxy-vuepress/pages/c5a54d/" class="nav-link">在线编辑和新增文章的方法</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="常见问题" class="dropdown-title"><a href="/neutrino-proxy-vuepress/pages/a20ce8/" class="link-title">常见问题</a> <span class="title" style="display:none;">常见问题</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/a20ce8/" class="nav-link">主题配置</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/f14bdb/" class="nav-link">首页配置</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/3216b0/" class="nav-link">front matter配置</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/54651a/" class="nav-link">目录页配置</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/1cc523/" class="nav-link">添加摘要</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/f51918/" class="nav-link">修改主题颜色和样式</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/ce175c/" class="nav-link">评论栏</a></li></ul></div></div><div class="nav-item"><a href="/neutrino-proxy-vuepress/pages/db78e2/" class="nav-link">演示</a></div><div class="nav-item"><a href="/neutrino-proxy-vuepress/pages/5d571c/" class="nav-link">案例</a></div><div class="nav-item"><a href="/neutrino-proxy-vuepress/pages/9cc27d/" class="nav-link">最近更新</a></div><div class="nav-item"><a href="/neutrino-proxy-vuepress/pages/1b12ed/" class="nav-link">关于我们</a></div> <a href="https://gitee.com/dromara/neutrino-proxy" target="_blank" rel="noopener noreferrer" class="repo-link">
    Gitee地址
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar-hover-trigger"></div> <aside class="sidebar" style="display:none;"><!----> <nav class="nav-links"><div class="nav-item"><a href="/neutrino-proxy-vuepress/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="快速使用" class="dropdown-title"><a href="/neutrino-proxy-vuepress/pages/793dcb/" class="link-title">快速使用</a> <span class="title" style="display:none;">快速使用</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/793dcb/" class="nav-link">快速上手</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/2f674a/" class="nav-link">目录结构</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/d0d7eb/" class="nav-link">Markdown 容器</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/197691/" class="nav-link">Markdown 中使用组件</a></li><li class="dropdown-item"><h4>相关文章</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/neutrino-proxy-vuepress/pages/8dfab5/" class="nav-link">使目录栏支持h2~h6标题</a></li><li class="dropdown-subitem"><a href="/neutrino-proxy-vuepress/pages/dd027d/" class="nav-link">如何让你的笔记更有表现力</a></li><li class="dropdown-subitem"><a href="/neutrino-proxy-vuepress/pages/2b8e22/" class="nav-link">批量操作front matter工具</a></li><li class="dropdown-subitem"><a href="/neutrino-proxy-vuepress/pages/0fc1d2/" aria-current="page" class="nav-link router-link-exact-active router-link-active">部署</a></li><li class="dropdown-subitem"><a href="/neutrino-proxy-vuepress/pages/9ae0bd/" class="nav-link">关于写文章和H1标题</a></li><li class="dropdown-subitem"><a href="/neutrino-proxy-vuepress/pages/26997d/" class="nav-link">关于博客搭建与管理</a></li><li class="dropdown-subitem"><a href="/neutrino-proxy-vuepress/pages/c5a54d/" class="nav-link">在线编辑和新增文章的方法</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="常见问题" class="dropdown-title"><a href="/neutrino-proxy-vuepress/pages/a20ce8/" class="link-title">常见问题</a> <span class="title" style="display:none;">常见问题</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/a20ce8/" class="nav-link">主题配置</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/f14bdb/" class="nav-link">首页配置</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/3216b0/" class="nav-link">front matter配置</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/54651a/" class="nav-link">目录页配置</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/1cc523/" class="nav-link">添加摘要</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/f51918/" class="nav-link">修改主题颜色和样式</a></li><li class="dropdown-item"><!----> <a href="/neutrino-proxy-vuepress/pages/ce175c/" class="nav-link">评论栏</a></li></ul></div></div><div class="nav-item"><a href="/neutrino-proxy-vuepress/pages/db78e2/" class="nav-link">演示</a></div><div class="nav-item"><a href="/neutrino-proxy-vuepress/pages/5d571c/" class="nav-link">案例</a></div><div class="nav-item"><a href="/neutrino-proxy-vuepress/pages/9cc27d/" class="nav-link">最近更新</a></div><div class="nav-item"><a href="/neutrino-proxy-vuepress/pages/1b12ed/" class="nav-link">关于我们</a></div> <a href="https://gitee.com/dromara/neutrino-proxy" target="_blank" rel="noopener noreferrer" class="repo-link">
    Gitee地址
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>快速上手</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/neutrino-proxy-vuepress/pages/793dcb/" class="sidebar-link">快速上手</a></li><li><a href="/neutrino-proxy-vuepress/pages/2f674a/" class="sidebar-link">目录结构</a></li><li><a href="/neutrino-proxy-vuepress/pages/d0d7eb/" class="sidebar-link">Markdown 容器</a></li><li><a href="/neutrino-proxy-vuepress/pages/197691/" class="sidebar-link">Markdown 中使用组件</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>相关文章</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/neutrino-proxy-vuepress/pages/8dfab5/" class="sidebar-link">使目录栏支持h2~h6标题</a></li><li><a href="/neutrino-proxy-vuepress/pages/dd027d/" class="sidebar-link">如何让你的笔记更有表现力</a></li><li><a href="/neutrino-proxy-vuepress/pages/2b8e22/" class="sidebar-link">批量操作front matter工具</a></li><li><a href="/neutrino-proxy-vuepress/pages/0fc1d2/" aria-current="page" class="active sidebar-link">部署</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header level2"><a href="/neutrino-proxy-vuepress/pages/0fc1d2/#_1-使用deploy-sh脚本部署" class="sidebar-link">1.使用deploy.sh脚本部署</a></li><li class="sidebar-sub-header level2"><a href="/neutrino-proxy-vuepress/pages/0fc1d2/#_2-使用github-action自动持续集成" class="sidebar-link">2. 使用GitHub Action自动持续集成</a></li><li class="sidebar-sub-header level2"><a href="/neutrino-proxy-vuepress/pages/0fc1d2/#部署升级-同时部署到github和coding" class="sidebar-link">部署升级：同时部署到github和coding</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header level3"><a href="/neutrino-proxy-vuepress/pages/0fc1d2/#部署方式有两种" class="sidebar-link">部署方式有两种：</a></li><li class="sidebar-sub-header level4"><a href="/neutrino-proxy-vuepress/pages/0fc1d2/#_1-、使用如下命令一键部署到github和coding" class="sidebar-link">1) 、使用如下命令一键部署到github和coding</a></li><li class="sidebar-sub-header level4"><a href="/neutrino-proxy-vuepress/pages/0fc1d2/#_2-、使用github-action自动部署到github和coding" class="sidebar-link">2）、使用GitHub Action自动部署到github和coding</a></li></ul></li></ul></li><li><a href="/neutrino-proxy-vuepress/pages/9ae0bd/" class="sidebar-link">关于写文章和一级标题</a></li><li><a href="/neutrino-proxy-vuepress/pages/26997d/" class="sidebar-link">关于博客搭建与管理</a></li><li><a href="/neutrino-proxy-vuepress/pages/c5a54d/" class="sidebar-link">在线编辑和新增文章的方法</a></li></ul></section></li></ul> </aside> <div><main class="page"><div class="theme-vdoing-wrapper "><div class="placeholder"></div> <!----> <div class="content-wrapper"><div class="right-menu-wrapper"><div class="right-menu-margin"><div class="right-menu-title">目录</div> <div class="right-menu-content"></div></div></div> <h1><img src="">部署<!----></h1> <div class="page-slot page-slot-top">
    <div class="wwads-cn wwads-horizontal page-wwads" data-id="136"></div>
    <style>
      .page-wwads{
        width:100%!important;
        min-height: 0;
        margin: 0;
      }
      .page-wwads .wwads-img img{
        width:80px!important;
      }
      .page-wwads .wwads-poweredby{
        width: 40px;
        position: absolute;
        right: 25px;
        bottom: 3px;
      }
      .wwads-content .wwads-text, .page-wwads .wwads-text{
        height: 100%;
        padding-top: 5px;
        display: block;
      }
  </style>
  </div> <div class="theme-vdoing-content content__default"><div class="custom-block warning"><p class="custom-block-title">注意</p> <p>目前作者使用的部署方式已改为 <a href="https://vercel.com/" target="_blank" rel="noopener noreferrer">vercel<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>，部署方法参考 <a href="https://zhuanlan.zhihu.com/p/347990778" target="_blank" rel="noopener noreferrer">这里<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>。（2022.01.01）<br>
更多 <a href="https://vuepress.vuejs.org/zh/guide/deploy.html#%E9%83%A8%E7%BD%B2" target="_blank" rel="noopener noreferrer">部署方式<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p></div> <p>本项目内置了两种<code>自动部署</code>脚本，用于一键部署到 GitHub Pages 或 国内访问速度更快的Coding Pages</p> <h2 id="_1-使用deploy-sh脚本部署"><a href="#_1-使用deploy-sh脚本部署" class="header-anchor">#</a> 1.使用deploy.sh脚本部署</h2> <p>第一步，修改<code>deploy.sh</code>脚本内的仓库地址为你的仓库，如有自定义域名则一并修改，没有则注释</p> <div class="language-bash extra-class"><pre class="language-bash"><code><span class="token comment"># 如果是发布到自定义域名</span>
<span class="token builtin class-name">echo</span> <span class="token string">'xugaoyi.com'</span> <span class="token operator">&gt;</span> CNAME

<span class="token comment"># 如果发布到 https://&lt;USERNAME&gt;.github.io</span>
<span class="token comment"># git push -f git@github.com:&lt;USERNAME&gt;/&lt;USERNAME&gt;.github.io.git master</span>

<span class="token comment"># 如果发布到 https://&lt;USERNAME&gt;.github.io/&lt;REPO&gt;</span>
<span class="token comment"># git push -f git@github.com:&lt;USERNAME&gt;/&lt;REPO&gt;.git master:gh-pages</span>
</code></pre></div><p>第二步，一键部署命令</p> <div class="language-bash extra-class"><pre class="language-bash"><code><span class="token function">npm</span> run deploy
</code></pre></div><blockquote><p>windows系统下使用bash命令窗</p></blockquote> <p>第三步，设置仓库的GitHub Pages。</p> <blockquote><p><code>deploy.sh</code>文件看 <a href="https://github.com/xugaoyi/vuepress-theme-vdoing/blob/master/deploy.sh" target="_blank" rel="noopener noreferrer">这里<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>
看不懂shell代码？ 参考：<a href="https://ipcmen.com/" target="_blank" rel="noopener noreferrer">shell教程<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p></blockquote> <h2 id="_2-使用github-action自动持续集成"><a href="#_2-使用github-action自动持续集成" class="header-anchor">#</a> 2. 使用GitHub Action自动持续集成</h2> <p>第一步，按照<a href="https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line" target="_blank" rel="noopener noreferrer">官方文档<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>，生成一个github token (令牌)。</p> <p>第二步，将这个密钥储存到当前仓库的<code>Settings/Secrets</code>里面。</p> <blockquote><p><code>Settings/Secrets</code>是储存秘密的环境变量的地方。环境变量的名字可以随便起，这里用的是<code>ACCESS_TOKEN</code>。如果你不用这个名字，<code>.github/workflows/ci.yml</code>脚本里的变量名也要跟着改。</p></blockquote> <p>第三步，push提交代码到GitHub仓库master分支。</p> <p>第四步，设置仓库的GitHub Pages</p> <blockquote><p>参考 <a href="http://xugaoyi.com/pages/6b9d359ec5aa5019/" target="_blank" rel="noopener noreferrer">GitHub Action实现自动部署静态博客<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> <code>ci.yml</code>文件看 <a href="https://github.com/xugaoyi/blog/blob/master/.github/workflows/ci.yml" target="_blank" rel="noopener noreferrer">这里<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>
看不懂yaml代码？ 参考：<a href="https://xugaoyi.com/pages/4e8444e2d534d14f/" target="_blank" rel="noopener noreferrer">yaml教程<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p></blockquote> <h2 id="部署升级-同时部署到github和coding"><a href="#部署升级-同时部署到github和coding" class="header-anchor">#</a> 部署升级：同时部署到github和coding</h2> <p>为了让博客站能够让百度收录，因此我把博客部署到了coding。相关<a href="https://xugaoyi.com/pages/41f87d890d0a02af/" target="_blank" rel="noopener noreferrer">文章<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>。</p> <p>在原有部署方式上做了升级，主要修改代码文件有下面这两个：</p> <p>使用前先将<a href="https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line" target="_blank" rel="noopener noreferrer">github token (令牌) <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>和<a href="https://dev.tencent.com/help/doc/account/access-token" target="_blank" rel="noopener noreferrer">coding token (令牌)<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> 同时设置到github仓库的<code>Settings/Secrets</code>位置。
<img src="https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/token.jpg" alt="token设置"></p> <h3 id="部署方式有两种"><a href="#部署方式有两种" class="header-anchor">#</a> 部署方式有两种：</h3> <h4 id="_1-、使用如下命令一键部署到github和coding"><a href="#_1-、使用如下命令一键部署到github和coding" class="header-anchor">#</a> 1) 、使用如下命令一键部署到github和coding</h4> <div class="language-sh extra-class"><pre class="language-sh"><code><span class="token function">npm</span> run deploy
</code></pre></div><h4 id="_2-、使用github-action自动部署到github和coding"><a href="#_2-、使用github-action自动部署到github和coding" class="header-anchor">#</a> 2）、使用GitHub Action自动部署到github和coding</h4> <p>只需要push提交代码到github仓库master分支即可。</p> <blockquote><p>参考 <a href="http://xugaoyi.com/pages/6b9d359ec5aa5019/" target="_blank" rel="noopener noreferrer">《GitHub Action实现自动部署静态博客》<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p></blockquote></div></div>  <div class="page-edit"><!----> <!----> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">2023/03/15, 13:11:57</span></div></div> <div class="page-nav-wapper"><div class="page-nav-centre-wrap"><a href="/neutrino-proxy-vuepress/pages/2b8e22/" class="page-nav-centre page-nav-centre-prev"><div class="tooltip">批量操作front matter工具</div></a> <a href="/neutrino-proxy-vuepress/pages/9ae0bd/" class="page-nav-centre page-nav-centre-next"><div class="tooltip">关于写文章和一级标题</div></a></div> <div class="page-nav"><p class="inner"><span class="prev">
        ←
        <a href="/neutrino-proxy-vuepress/pages/2b8e22/" class="prev">批量操作front matter工具</a></span> <span class="next"><a href="/neutrino-proxy-vuepress/pages/9ae0bd/">关于写文章和一级标题</a>→
      </span></p></div></div></div> <!----></main></div> <div class="footer"><div class="icons"><a href="mailto:aoshiguchen@dromara.org" title="发邮件" target="_blank" class="iconfont icon-youjian"></a><a href="https://gitee.com/dromara/neutrino-proxy" title="Gitee" target="_blank" class="iconfont icon-gitee"></a><a href="https://github.com/aoshiguchen/neutrino-proxy" title="Github" target="_blank" class="iconfont icon-github"></a></div> 
  Theme by
  <a href="https://github.com/xugaoyi/vuepress-theme-vdoing" target="_blank" title="本站主题">Vdoing</a> 
    | Copyright © 2023-2023
    <span>傲世孤尘 | MIT License</span></div> <div class="buttons"><div title="返回顶部" class="button blur go-to-top iconfont icon-fanhuidingbu" style="display:none;"></div> <div title="去评论" class="button blur go-to-comment iconfont icon-pinglun" style="display:none;"></div> <div title="主题模式" class="button blur theme-mode-but iconfont icon-zhuti"><ul class="select-box" style="display:none;"><li class="iconfont icon-zidong">
          跟随系统
        </li><li class="iconfont icon-rijianmoshi">
          浅色模式
        </li><li class="iconfont icon-yejianmoshi">
          深色模式
        </li><li class="iconfont icon-yuedu">
          阅读模式
        </li></ul></div></div> <!----> <!----> <!----></div><div class="global-ui"></div></div>
    <script src="/neutrino-proxy-vuepress/assets/js/app.756733d0.js" defer></script><script src="/neutrino-proxy-vuepress/assets/js/2.4ec61f8d.js" defer></script><script src="/neutrino-proxy-vuepress/assets/js/13.c2fbbac4.js" defer></script>
  </body>
</html>
